﻿<%@ Page Language="VB" %>

<script runat="server">
    
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        '' Set the content-type as XML
        Me.Response.ContentType = "text/xml"
    End Sub
    
</script>

<asp:objectdatasource runat="server" id="SitemapDataSource" 
    SelectMethod="GetHtmlSiteMapEntries" 
    TypeName="OpenLightGroup.PageMapping.PageMappingsService"></asp:objectdatasource>
<asp:repeater runat="server" datasourceid="SitemapDataSource">
    <HeaderTemplate>
        <?xml version="1.0" encoding="UTF-8" ?>
        <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
    </HeaderTemplate>
    <ItemTemplate>

            
            <url>
                <loc><%#New Uri(Me.Request.Url, Me.ResolveUrl(Eval("HtmlUrl")))%></loc>
                <lastmod><%#Eval("LastModified", "{0:yyyy-MM-dd}")%></lastmod>
                <changefreq><%# Eval("ChangeFrequency")%></changefreq>
                <priority><%#Eval("Priority", "{0:#.#}")%></priority>
            </url>
   
    </ItemTemplate>
    <FooterTemplate>
        </urlset>
    </FooterTemplate>
</asp:repeater>

